import request from '@/utils/request'

export function queryByCondition(modelName, offset, row, data) {
  return request({
    url: `/data/${modelName}/queryByCondition/${offset}/${row}`,
    method: 'post',
    data
  })
}
export function queryById(modelName, id) {
  return request({
    url: `/data/${modelName}/queryById/${id}`,
    method: 'get'
  })
}
export function updateById(modelName, id, data) {
  return request({
    url: `/data/${modelName}/updateById/${id}`,
    method: 'post',
    data: data
  })
}
export function insertRecord(modelName, data) {
  return request({
    url: `/data/${modelName}/insertRecord`,
    method: 'post',
    data: data
  })
}
export function deleteById(modelName, id) {
  return request({
    url: `/data/${modelName}/deleteById/${id}`,
    method: 'post'
  })
}

